package o;

import androidx.annotation.Nullable;
import com.huawei.appgallery.downloadengine.api.SessionDownloadTask;
import com.huawei.appgallery.foundation.card.base.bean.AppInfoBean;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;
import o.dkb.d;

class dtz$2 implements IServerCallBack {
    final /* synthetic */ dtz ˊ;
    final /* synthetic */ AppInfoBean ˎ;

    dtz$2(dtz o_dtz, AppInfoBean appInfoBean) {
        this.ˊ = o_dtz;
        this.ˎ = appInfoBean;
    }

    public void prePostResult(BaseRequest o_cvu, ResponseBean responseBean) {
    }

    public void notifyResult(BaseRequest o_cvu, ResponseBean responseBean) {
        Logger.ˎ("APP_SYN", dtz.ʻ() + " startTask checkSynApp getResponseCode=" + responseBean.getResponseCode() + "  getRtnCode_=" + responseBean.getRtnCode_());
        if (responseBean.getResponseCode() != 0) {
            Logger.ˎ("APP_SYN", dtz.ʻ() + " startTask checkSynApp request fail");
            dtz.ˎ(this.ˊ, this.ˎ);
        } else if (((dtu) responseBean).getRtnCode_() != 0) {
            Logger.ˎ("APP_SYN", dtz.ʻ() + " startTask checkSynApp not in purchase list");
            dtz.ˎ(this.ˊ, this.ˎ);
        } else if (!dtw.ˏ(this.ˎ)) {
            Logger.ˎ("APP_SYN", dtz.ʻ() + " startTask checkSynApp local check fail");
            dtz.ˎ(this.ˊ, this.ˎ);
        } else if (dtw.ˋ() && !ejj.ˊ().ˎ()) {
            dtz.ˋ(this.ˊ);
            Logger.ˎ("APP_SYN", dtz.ʻ() + " startTask checkSynApp doDownload ");
            dtz.ˋ(this.ˊ, this.ˎ, new d(this) {
                final /* synthetic */ dtz$2 ˊ;

                {
                    this.ˊ = r1;
                }

                public void ˋ(@Nullable SessionDownloadTask sessionDownloadTask) {
                    if (sessionDownloadTask != null) {
                        sessionDownloadTask.ˋॱ(6);
                        sessionDownloadTask.ˋ(2);
                        sessionDownloadTask.ˋ(new dvw());
                        dvt.ˏ().ʽ(sessionDownloadTask);
                        dty.ॱ().ˊ(sessionDownloadTask.ˊˊ());
                    }
                }
            });
        }
    }
}
